#ifndef CONTROL_H
#define CONTROL_H

#include <QDialog>
#include <memory>
#include <driver.h>

namespace Ui {
class Control;
}

class Control : public QDialog
{
    Q_OBJECT

public:
    explicit Control(std::shared_ptr<Driver> driver ,QWidget *parent = nullptr);
    ~Control();

protected:
    void closeEvent(QCloseEvent* event) override { driver_->status_ = DriverStatus::FINISHED; }

public slots:
    void startStop();

private:
    Ui::Control *ui;
    std::shared_ptr<Driver> driver_;
};

#endif // CONTROL_H
